<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2022/10/29
  Time: 21:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的卖车预约</title>

    <link type="text/css" href="css/idea.css" rel="stylesheet" />
    <link type="text/css" href="css/user_home.css" rel="stylesheet" />
    <link type="text/css" href="css/user_home_order.css" rel="stylesheet" />
    <link type="text/css" href="css/common.css" rel="stylesheet" />
    <link type="text/css" href="css/reset.css" rel="stylesheet" />
    <link rel="shortcut icon" type="image/x-icon" href="images/nangua.jpg" media="screen" />
    <link type="text/css" href="css/user_home_favorite.css" rel="stylesheet" />
    <link type="text/css" href="css/pagination.css" rel="stylesheet" />



    <script type="text/javascript" src="js/jquery-3.2.0.min.js"></script><!--必须得放在第一的位置-->
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/index_type_more.js"></script>

    <script type="text/javascript" src="js/user_home.js"></script>
    <script type="text/javascript" src="js/user_home_order.js"></script>
    <script type="text/javascript" src="js/user_home_favorite.js"></script>

</head>


<body>
<script>
    function Cancel(sell_id){
        if(confirm('您确定要取消预约吗？')){
            location.href="CancelSellCar.do?sell_id=" + sell_id;
        }

    }

    function myshow(id){
        $("#sell_id").val(id);
        $('#myModal').modal('show');
    }

</script>

<script type="text/javascript">

    //加载出我想要卖的车辆

    $(document).ready(function () {
        myjump(1,3);
    });
    function myjump(page,size) {
        $.ajax({
            url:"getWantSellListByUserIdOfPage.do",
            type:"GET",
            data:{page:page,size:size},
            dataType:"json",
            success:function (msg) {
                if(msg.flag==1){
                    var datalist=msg.data.olist;
                    var html='';
                    for (var i = 0; i<datalist.length; i++) {
                        html += '<div class="content_goods_favorite_con_con " >';
                        html += '<div class="con_goods1 fl clearfix">';
                        html += '</div>';
                        html += '<div style="font-size: 15px;width: 1000px;margin-left: 30px">';
                        html += '<div style="width: 166px;float: left">' + datalist[i].sell_carname+ '</div>';
                        html += '<div style="width: 150px;float: left">' + datalist[i].sell_cardept + '</div >';
                        html += '<div style="width: 166px;float: left">' +datalist[i].sell_address+ '</div>';
                        html += '<div style="width: 210px;float: left;padding-left: 46px">' + datalist[i].sell_phone+ '</div>';
                        html += '<div style="width: 140px;float: left">' + datalist[i].sell_status+ '</div>';
                        html += '<div style="width: 40px;float: left"><a href="javascript:Cancel(' + datalist[i].sell_id+ ')">取消</a></div>';
                        html += '</div>';
                        html += '</div>';
                        html += '<div class="hr_10"></div>';
                    }
                    var str = ''
                    str='<a href="javaScript:myjump(1,3)" style="padding: 4px 10px;background: #fff;font-size: 14px;color: #0B6FB0;margin: 0 3px;text-decoration: none;">首页</a>&nbsp;'+
                        '<a href="javaScript:myjump('+(msg.data.page-1)+',3)"style="padding: 4px 10px;font-size: 14px;background: #fff;color: #0B6FB0;margin: 0 3px;text-decoration: none;">上一页</a>&nbsp;'+
                        '<a href="javaScript:myjump('+(msg.data.page+1)+',3)"style="padding: 4px 10px;font-size: 14px;background: #fff;color: #0B6FB0;margin: 0 3px;text-decoration: none;">下一页</a>&nbsp;'+
                        '<a href="javaScript:myjump('+msg.data.maxPage+',3)"style="padding: 4px 10px;font-size: 14px;background: #fff;color: #0B6FB0;margin: 0 3px;text-decoration: none;">尾页</a>' ;

                    $("#mywantselllist").html(html);//数据列表
                    $("#pageandsize").html(str);//分页

                }else if(msg.flag==0){
                    if(msg.info=="您尚未登录请先登录!"){
                        alert("您尚未登录请先登录!");
                        location.href="user_login.jsp";
                    }else{
                        $("#myfavoritelist").html("您没有想要卖的车车，快去卖车车吧");

                    }

                }
            }

        });
    }
</script>

<div class="index">
    <!--头部导航-->
    <jsp:include page="head.jsp"></jsp:include>
    <!--头部导航结束-->
    <div class="hr_5"></div>
    <div class="user_content f_f width_1200_center">
        <div class="content_position">您当前的位置：<a href="javascript:">首页</a><span>&gt;</span><a href="userhome.jsp">个人中心</a><span>&gt;</span><a href="mycar.jsp">卖车预约</a></div>
        <!-- <div class="user_content_top f_z15"><a href="#">注册会员</a><span>Register</span></div>-->
        <div class="hr_10"></div>
        <div class="user_content_con over_hidden width_1200_center"><!--over_hidden也是清除浮动的一种-->
            <div class="user_content_con_nav fl" style="height: 440px">
                <div class="nav_info">
                    <h1>个人信息</h1>
                    <ul>
                        <li><a href="userhome.jsp">个人资料</a></li>
                        <li><a href="#">收货地址</a></li>
                        <li><a href="#">安全设置</a></li>
                    </ul>
                </div>
                <div class="nav_goods">
                    <h1>商品管理</h1>
                    <ul>
                        <li><a href="order.jsp">我的订单</a></li>
                        <li><a href="mycar.jsp">我卖的车</a></li>
                        <li><a href="mywantsellcar.jsp">卖车预约</a></li>
                        <li><a href="myfavorite.jsp">我想要的</a></li>
                        <li><a href="mycollection.jsp">我的收藏</a></li>
                        <li><a href="myreserve.jsp">看车预约</a></li>
                    </ul>
                </div>

            </div>
            <!--右侧购物车-->
            <div class="user_content_con_c fr">
                <div class="content_goods_favorite f_f width_1000_center">
                    <div class="content_goods_favorite_top over_hidden width_1000_center">
                        <div class="top_favorite fl"><h1>我的卖车预约</h1></div>                                  <!--全部想要-->
                        <div class="top_all fr"><span class="span1"></span><span class="span2" ></span></div>
                    </div>
                    <div class="content_goods_favorite_con width_1000_center clearfix">
                        <div class="content_goods_favorite_con_top">
                            <!--  <div class="con_check fl"><input class="check_all" type="checkbox" id="con_check1"/><span><label for="con_check1">全选</label></span></div>-->
                            <div >
                                <h1 style="float: left;margin-left:50px;" >品牌</h1>
                                <h1 style="float: left;margin-left:150px;">系别</h1>
                                <h1 style="float: left;margin-left:150px;">地址</h1>
                                <h1 style="float: left;margin-left:150px;">联系电话</h1>
                                <h1 style="float: left;margin-left:150px;">状态</h1>
                                <h1 style="float: left;margin-left:110px;">操作</h1>
                            </div>

                        </div>
                        <div class="hr_5"></div>


                        <!--数据类表-->
                        <div id="mywantselllist">


                        </div>
                        <!--分页-->
                        <div align="center" id="pageandsize" style="margin-left: 740px">
                        </div>


                        <!--分页-->
                    </div>
                </div>
            </div><!--右侧购物车完-->
        </div><!--左右侧完-->
        <!--以后复制的开始-->

        <!--以后复制的结束-->
    </div><!--整个内容部分-->



    <div class="hr_8"></div>
    <!--底部-->
    <jsp:include page="foot.jsp"></jsp:include>
    <!--底部-->
</div>

</body>
</html>

